<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>const</title>
</head>
<body>
<script>
    // obj
  /* const person={};
   person.name='zs';
   person.age=30;

   console.log(person)
   console.log(person.name)
   console.log(person.age)

   // error
   person={};*/

  // arr
    const arr=[];
    console.log(arr);
    console.log(arr.length)
    console.log('-----------');
    // arr.push('hello world');
    arr[1]='hello world';
    console.log(arr);
    console.log(arr[1]);
    console.log(arr.length)
    console.log('-----------');
    arr.length=0;
    console.log(arr);
    console.log(arr.length)
    console.log('-----------');
    // error
    arr=['hellow erroor'];
</script>
</body>
</html>